import { reactive } from 'vue'
const store = reactive({
  logined:false,
  userinfo: {id:"",username:"",name:"",address:""},
  token:""
})
if(sessionStorage.getItem("token")){//如果刷新了页面 会重新执行 所以也要从sessionStorage里面取下
   store.logined = true
   store.userinfo = JSON.parse(sessionStorage.getItem("userinfo")||"")
   store.token = sessionStorage.getItem("token")||""
}
export {store}